3.13 \(\int \frac {\sin (x)}{a+b \cos ^2(x)} \, dx\)

Optimal. Leaf size=26 \[ -\frac {\tan ^{-1}\left (\frac {\sqrt {b} \cos (x)}{\sqrt {a}}\right )}{\sqrt {a} \sqrt {b}} \]

[Out]

-arctan(cos(x)*b^(1/2)/a^(1/2))/a^(1/2)/b^(1/2)

________________________________________________________________________________________

Rubi [A]  time = 0.03, antiderivative size = 26, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, integrand size = 13, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.154, Rules used = {3190, 205} \[ -\frac {\tan ^{-1}\left (\frac {\sqrt {b} \cos (x)}{\sqrt {a}}\right )}{\sqrt {a} \sqrt {b}} \]

Antiderivative was successfully verified.

[In]

Int[Sin[x]/(a + b*Cos[x]^2),x]

[Out]

-(ArcTan[(Sqrt[b]*Cos[x])/Sqrt[a]]/(Sqrt[a]*Sqrt[b]))

Rule 205

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[a/b, 2]*ArcTan[x/Rt[a/b, 2]])/a, x] /; FreeQ[{a, b}, x]
&& PosQ[a/b]

Rule 3190

Int[cos[(e_.) + (f_.)*(x_)]^(m_.)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]^2)^(p_.), x_Symbol] :> With[{ff = Free
Factors[Sin[e + f*x], x]}, Dist[ff/f, Subst[Int[(1 - ff^2*x^2)^((m - 1)/2)*(a + b*ff^2*x^2)^p, x], x, Sin[e +
f*x]/ff], x]] /; FreeQ[{a, b, e, f, p}, x] && IntegerQ[(m - 1)/2]

Rubi steps

\begin {align*} \int \frac {\sin (x)}{a+b \cos ^2(x)} \, dx &=-\operatorname {Subst}\left (\int \frac {1}{a+b x^2} \, dx,x,\cos (x)\right )\\ &=-\frac {\tan ^{-1}\left (\frac {\sqrt {b} \cos (x)}{\sqrt {a}}\right )}{\sqrt {a} \sqrt {b}}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.02, size = 26, normalized size = 1.00 \[ -\frac {\tan ^{-1}\left (\frac {\sqrt {b} \cos (x)}{\sqrt {a}}\right )}{\sqrt {a} \sqrt {b}} \]

Antiderivative was successfully verified.

[In]

Integrate[Sin[x]/(a + b*Cos[x]^2),x]

[Out]

-(ArcTan[(Sqrt[b]*Cos[x])/Sqrt[a]]/(Sqrt[a]*Sqrt[b]))

________________________________________________________________________________________

fricas [A]  time = 0.74, size = 73, normalized size = 2.81 \[ \left [-\frac {\sqrt {-a b} \log \left (-\frac {b \cos \relax (x)^{2} + 2 \, \sqrt {-a b} \cos \relax (x) - a}{b \cos \relax (x)^{2} + a}\right )}{2 \, a b}, -\frac {\sqrt {a b} \arctan \left (\frac {\sqrt {a b} \cos \relax (x)}{a}\right )}{a b}\right ] \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sin(x)/(a+b*cos(x)^2),x, algorithm="fricas")

[Out]

[-1/2*sqrt(-a*b)*log(-(b*cos(x)^2 + 2*sqrt(-a*b)*cos(x) - a)/(b*cos(x)^2 + a))/(a*b), -sqrt(a*b)*arctan(sqrt(a
*b)*cos(x)/a)/(a*b)]

________________________________________________________________________________________

giac [A]  time = 0.18, size = 17, normalized size = 0.65 \[ -\frac {\arctan \left (\frac {b \cos \relax (x)}{\sqrt {a b}}\right )}{\sqrt {a b}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sin(x)/(a+b*cos(x)^2),x, algorithm="giac")

[Out]

-arctan(b*cos(x)/sqrt(a*b))/sqrt(a*b)

________________________________________________________________________________________

maple [A]  time = 0.04, size = 18, normalized size = 0.69 \[ -\frac {\arctan \left (\frac {\cos \relax (x ) b}{\sqrt {a b}}\right )}{\sqrt {a b}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sin(x)/(a+b*cos(x)^2),x)

[Out]

-1/(a*b)^(1/2)*arctan(cos(x)*b/(a*b)^(1/2))

________________________________________________________________________________________

maxima [A]  time = 0.92, size = 17, normalized size = 0.65 \[ -\frac {\arctan \left (\frac {b \cos \relax (x)}{\sqrt {a b}}\right )}{\sqrt {a b}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sin(x)/(a+b*cos(x)^2),x, algorithm="maxima")

[Out]

-arctan(b*cos(x)/sqrt(a*b))/sqrt(a*b)

________________________________________________________________________________________

mupad [B]  time = 2.23, size = 18, normalized size = 0.69 \[ -\frac {\mathrm {atan}\left (\frac {\sqrt {b}\,\cos \relax (x)}{\sqrt {a}}\right )}{\sqrt {a}\,\sqrt {b}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sin(x)/(a + b*cos(x)^2),x)

[Out]

-atan((b^(1/2)*cos(x))/a^(1/2))/(a^(1/2)*b^(1/2))

________________________________________________________________________________________

sympy [A]  time = 1.07, size = 87, normalized size = 3.35 \[ \begin {cases} \frac {\tilde {\infty }}{\cos {\relax (x )}} & \text {for}\: a = 0 \wedge b = 0 \\\frac {1}{b \cos {\relax (x )}} & \text {for}\: a = 0 \\- \frac {\cos {\relax (x )}}{a} & \text {for}\: b = 0 \\\frac {i \log {\left (- i \sqrt {a} \sqrt {\frac {1}{b}} + \cos {\relax (x )} \right )}}{2 \sqrt {a} b \sqrt {\frac {1}{b}}} - \frac {i \log {\left (i \sqrt {a} \sqrt {\frac {1}{b}} + \cos {\relax (x )} \right )}}{2 \sqrt {a} b \sqrt {\frac {1}{b}}} & \text {otherwise} \end {cases} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sin(x)/(a+b*cos(x)**2),x)

[Out]

Piecewise((zoo/cos(x), Eq(a, 0) & Eq(b, 0)), (1/(b*cos(x)), Eq(a, 0)), (-cos(x)/a, Eq(b, 0)), (I*log(-I*sqrt(a
)*sqrt(1/b) + cos(x))/(2*sqrt(a)*b*sqrt(1/b)) - I*log(I*sqrt(a)*sqrt(1/b) + cos(x))/(2*sqrt(a)*b*sqrt(1/b)), T
rue))

________________________________________________________________________________________